<template>
  <section id="container">
      <myhead></myhead>
      <mymenu ref="mymenu"></mymenu>
      <school></school>
  </section>
</template>

<script>
  import myhead from './myhead.vue'
  import mymenu from './mymenu.vue'
  import school from './school.vue'
  export default {
    name: 'index',
    data () {
      return {
        head_message: '云归谷远程控制系统',
        logout_msg:"注销",
        schoollist:[],
      }
    },
    created() {
      var token = sessionStorage.getItem('shiro-token');
      if(!token){
        this.$router.push({path: '/'})
      }
    },
    components: {
      myhead,mymenu,school
    },
    mounted () {
      this.setMenu()
    },
    methods:{
      setMenu(){
        this.$refs.mymenu.setMenu('index');
      }
    }
  }
</script>

<style scoped>
  @import "../assets/css/jquery.gritter.css";
</style>
